# 导入库函数
import requests

from config import config_run

config = config_run()
APIKEY = config[0]
device_id = config[1]
datastream_id = config[2]

# 此处device_id替换为设备ID，datastream_id替换为数据流名称
# url = 'http://api.heclouds.com/devices/device_id/datastreams/datastream_id'
url = ('http://api.heclouds.com/devices/' + device_id + '/datastreams/Lum')

# 构建报文头部
headers = {
    "api-key": APIKEY
}

# 请求服务器发送信息
r = requests.delete(url, headers=headers)

# 返回响应报文头部
print(r.headers)
print('1', 20 * '*')

# 返回响应报文主体
print(r.text)
print('2', 20 * '*')
